// pages/index/update-city/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    store: {
      type: Object,
      value: {}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    Opacity: 1
  },

  /**
   * 组件的方法列表
   */
  methods: {
    goToStoreList: function () {
      var that = this;
      var stores = {
        name: that.data.store.name,
        address: that.data.store.address,
        mobile: that.data.store.contact_tel,
        store_id: that.data.store.id
      };
      
       wx.navigateTo({
         url: '/pages/store/store?store=' + JSON.stringify(stores),
       });
     },
     updateOpacity: function (t) {
       var scrollTop = t.scrollTop;
       if (scrollTop > 300) {
        var Opacity = 0;
       }else {
        var Opacity = 1-(scrollTop/300)
       }
       this.setData({
        Opacity: Opacity
       })
     }
  }
})
